class Animal {
    protected String name;

    public Animal(String name) {
        this.name = name;
    }
}

class Dog extends Animal {
    public Dog(String name) {
        super(name);
    }
}
public class Main {
    public static void main(String[] args) {
        Animal dog = new Dog("Buddy");
        System.out.println("Dog's name: " + dog.name);
    }
}